<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>视频审核</title>
  <link rel="stylesheet" href="../lib/layui/css/layui.css">
  <link rel="stylesheet" href="../styles/css/index.css">
</head>

<body>
  <div class="''">
    <div class="headTitle">
      设备管理
    </div>
    <form action="" class="layui-form">
      <div class="layui-row">
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label">所属农场</label>
            <div class="layui-input-block">
              <select name="sec" required="true" lay-verify="required">
                <option value="">请选择</option>
                <option value="1">请选择</option>
              </select>
            </div>
          </div>
        </div>
        <div class="layui-col-md1">&nbsp;</div>
      </div>
      <div class="layui-row">
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label">所属管理区</label>
            <div class="layui-input-block">
              <select name="sec1" required="true" lay-verify="required">
                <option value="">请选择</option>
                <option value="1">请选择</option>
              </select>
            </div>
          </div>
        </div>
        <div class="layui-col-md1">&nbsp;</div>
        <div class="layui-col-md3">
          <div class="layui-form-item">
            <label class="layui-form-label">地块名称</label>
            <div class="layui-input-block">
              <input type="text" name="title" placeholder="请输入地块名称" autocomplete="off" class="layui-input"
                required="true" lay-verify="required">
            </div>
          </div>
        </div>
        <div class="layui-col-md1">&nbsp;</div>
        <div class="layui-col-md3">
          <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
        </div>
      </div>
    </form>
    <div>
      <table id="demoTable" lay-filter="test"></table>
    </div>
  </div>
  <script src="../lib/layui/layui.js"></script>
  <script type="text/html" id="barDemo">
    <a href="cgqxx.html" class="layui-btn layui-btn-xs" lay-event="detail">传感器信息</a>
    <!-- <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">修改</a> -->
    <a href="ggwj.html" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">规格文件</a>
  </script>
  <script>
    layui.use(['table', 'jquery'], function () {
      var table = layui.table;
      var $ = jQuery = layui.$;
      //第一个实例
      table.render({
        elem: '#demoTable',
        //					height: 315
        //  ,url: '/demo/table/user/' //数据接口
        //						,
        page: true //开启分页
          ,
        cols: [
          [ //表头
            {
              field: 'id',
              title: '序号',
              width: '10%',
              align: 'center',
              fixed: 'left'
            }, {
              field: 'username',
              title: '地块名称',
              align: 'center',
              width: '20%'
            }, {
              field: 'dklx',
              title: '地块类型',
              align: 'center',
              width: '10%'
            }, {
              field: 'city',
              title: '所属管理区',
              align: 'center',
              width: '20%'
            }, {
              field: 'sign',
              title: '登记时间',
              align: 'center',
              width: '20%'
            }, {
              field: 'experience',
              title: '操作',
              width: '20%',
              align: 'center',
              toolbar: '#barDemo'
            }
          ]
        ],
        data: [
            { //表格数据
          "id": "10001",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "116",
          "ip": "192.168.0.8",
          "logins": "108",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10002",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "12",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14",
        }, {
          "id": "10003",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "65",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10004",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "666",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10005",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "86",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10006",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "12",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10007",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "16",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }, {
          "id": "10008",
          "username": "地块",
          "email": "xianxin@layui.com",
          "sex": "男",
          "dklx": "水田",
          "city": "浙江杭州",
          "sign": "人生恰似一场修行",
          "experience": "106",
          "ip": "192.168.0.8",
          "logins": "106",
          "area": "价目是",
          "shzt": "2016-10-14"
        }]
      });
    });
  </script>
</body>

</html>
<script>
  layui.use('form', function () {
    var form = layui.form;
    //监听提交
    form.on('submit(formDemo)', function (data) { //提交事件回调
      layer.msg(JSON.stringify(data.field));
      return false;
    });
  });
</script>